<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<form id="form_socepmi" action="<?php echo url_for('socepmi/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_sistema='.$form->getObject()->getIdSistema() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<input type="hidden" name="id_sistema" value="<?php echo $form->getObject()->getIdSistema() ?>" />
<?php endif; ?>
	<?php echo $form->renderHiddenFields() ?>
  <table class="form">
    <tbody>
      <tr><th colspan="2" class="title">Dados socepmi</th></tr>	
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['nm_sistema']->renderLabel() ?></th>
        <td>
          <?php echo $form['nm_sistema'] ?>
          <?php echo form_error('nm_sistema'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['id_sistema_pai']->renderLabel() ?></th>
        <td>
          <?php echo $form['id_sistema_pai'] ?>
          <?php echo form_error('id_sistema_pai'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_sobre']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_sobre'] ?>
          <?php echo form_error('ds_sobre'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_endereco']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_endereco'] ?>
          <?php echo form_error('ds_endereco'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_servico']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_servico'] ?>
          <?php echo form_error('ds_servico'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_twitter']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_twitter'] ?>
          <?php echo form_error('ds_twitter'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_facebook']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_facebook'] ?>
          <?php echo form_error('ds_facebook'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_you_tube']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_you_tube'] ?>
          <?php echo form_error('ds_you_tube'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_orkut']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_orkut'] ?>
          <?php echo form_error('ds_orkut'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_flickr']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_flickr'] ?>
          <?php echo form_error('ds_flickr'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_maps']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_maps'] ?>
          <?php echo form_error('ds_maps'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_termo_uso']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_termo_uso'] ?>
          <?php echo form_error('ds_termo_uso'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_como_comprar']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_como_comprar'] ?>
          <?php echo form_error('ds_como_comprar'); ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>

<?php 
	comandos_form(
		link_to(
			':: Voltar ::',
			'socepmi/filter',
			array('class' => 'botao')
		),
		button_to_function(
			':: Salvar ::',
			"$('#form_socepmi').submit()",
			array('class' => 'botao')
		)
	);
?>